<%@ page import="com.ecable.daoImpl.*,com.ecable.bean.*"%>
<%@page import="java.util.Vector"%>
<%@ page errorPage="UserExceptionHandler.jsp"%>
<%@page import="java.util.Iterator;"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
	<head>

		<style type="text/css">
.Title {
	font-family: Verdana;
	font-weight: bold;
	font-size: 8pt
}

.Title1 {
	font-family: Verdana;
	font-weight: bold;
	font-size: 8pt
}
</style>

		<script language="JavaScript" src="scripts/gen_validatorv31.js"
			type="text/javascript"></script>
		<script language="JavaScript" type="text/javascript"
			src="scripts/ts_picker.js"></script>
		<script language="JavaScript1.1" src="scripts/pass.js">


</script>
		<script type="text/javascript" src="scripts/image.js"> </script>
		<script type="text/javascript" src="scripts/general.js"> </script>
		<script type="text/javascript" src="scripts/adi.js"> </script>
		<script type="text/javascript" src="scripts/form_validation.js"> </script>

		<script language="JavaScript" src="images/javascripts.js"></script>
		<script language="JavaScript" src="images/pop-closeup.js"></script>
	</head>
	<body>
		<jsp:include page="Header.jsp"></jsp:include>
		<%
			String status = (String) request.getAttribute("status");
			String path = request.getRealPath("/images");
			//Profile aprofile = new ProfileDAO().getProfile(path, user);
			String s;
		%>
		<center>
			<b><%=request.getParameter("usertype")%>s Details</b>
			<table align="center" border="1" bgcolor="">
				<tr bgcolor="ashblue">
					<th>
						<b> ID</b>
					</th>
					<th>
						<b>FirstName</b>
					</th>
					<th>
						<b>Date <br>Of<br>Registration</b>
					</th>
					<th>
						<b>Contact</b>
					</th>
					<th>
						<b>Address</b>
					</th>
					<th>
						<b>photo</b>
					</th>
				</tr>
				<%
					Vector c = (Vector) request.getAttribute("opinfo");
					Iterator it = c.listIterator();
					int count = 0;
					while (it.hasNext()) {
						System.out.println("loop repeated" + count);
						ProfileTO aprofile = (ProfileTO) it.next();
						s = aprofile.getPhoto();
						System.out.println(s);
				%>
				<tr>
					<td>
						<%
							if (session.getAttribute("role").equals("Admin")) {
						%>
						<a href='./UpdateOperatorsInfo?userid=<%=aprofile.getId()%>'><%=aprofile.getId()%></a>
						<%
							} else if (session.getAttribute("role").equals("Operator")) {
						%><a href='./DeleteCustomerStatus?userid=<%=aprofile.getId()%>'><%=aprofile.getId()%></a>
						<%
							} else {
						%><%=aprofile.getId()%>
						<%
							}
						%>

					</td>
					<td>
						<%=aprofile.getFirstname()%>
					</td>
					<td>
						<%=aprofile.getDOR()%>
					</td>
					<td>
						<b>Email :</b>
						<%=aprofile.getEmail()%><br>
						<b> Fax :</b><%=aprofile.getFax()%><br>
						<b>Phoneno :</b><%=aprofile.getPhone()%>

					</td>
					<td>
						<b>Village :</b><%=aprofile.getCity()%><br>
						<b>District :</b><%=aprofile.getDistrict()%><br>
						<b>State :</b><%=aprofile.getState()%>
					</td>
					<td>
						<img src="<%=s%>" height=100 width=100>
					</td>
				</tr>
				<%
					}
				%>
			</table>
		</center>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<jsp:include page="Footer.jsp"></jsp:include>
	</body>
</html>